<!DOCTYPE html><html lang="zh-CN" data-theme="dark"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>话费充值平台总结 | 前端攻城狮ZhuoRu</title><meta name="keywords" content="h5,微信公众号,vue,张卓如,web,前端"><meta name="author" content="ZhuoRu"><meta name="copyright" content="ZhuoRu"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#0d0d0d"><meta name="baidu-site-verification" content="code-0ABMo98myg"><meta name="description" content="微信公众号,后台充值系统总结">
<meta property="og:type" content="article">
<meta property="og:title" content="话费充值平台总结">
<meta property="og:url" content="https://zhangzhuoru.gitee.io/web/post/1024.html">
<meta property="og:site_name" content="前端攻城狮ZhuoRu">
<meta property="og:description" content="微信公众号,后台充值系统总结">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://zhangzhuoru.gitee.io/web/img/tab2.png">
<meta property="article:published_time" content="2022-11-26T16:31:04.798Z">
<meta property="article:modified_time" content="2021-07-22T16:27:23.000Z">
<meta property="article:author" content="ZhuoRu">
<meta property="article:tag" content="vue">
<meta property="article:tag" content="微信公众号">
<meta property="article:tag" content="h5">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://zhangzhuoru.gitee.io/web/img/tab2.png"><link rel="shortcut icon" href="/web/img/favicon.png"><link rel="canonical" href="https://zhangzhuoru.gitee.io/web/post/1024"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/web/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/web/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":500},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: {"limitCount":50,"languages":{"author":"作者: ZhuoRu","link":"链接: ","source":"来源: 前端攻城狮ZhuoRu","info":"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#121212","position":"top-right"},
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: true,
  islazyload: true,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = { 
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2021-07-23 00:27:23'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    })(window)</script><link rel="stylesheet" href="./css/custom.css"><link rel="stylesheet" href="https://fastly.jsdelivr.net/gh/tzy13755126023/BLOG_SOURCE/css/function.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://fastly.jsdelivr.net/gh/l-lin/font-awesome-animation/dist/font-awesome-animation.min.css"  media="defer" onload="this.media='all'"><svg aria-hidden="true" style="position:absolute; overflow:hidden; width:0; height:0"><symbol id="icon-sun" viewBox="0 0 1024 1024"><path d="M611.370667 167.082667a445.013333 445.013333 0 0 1-38.4 161.834666 477.824 477.824 0 0 1-244.736 244.394667 445.141333 445.141333 0 0 1-161.109334 38.058667 85.077333 85.077333 0 0 0-65.066666 135.722666A462.08 462.08 0 1 0 747.093333 102.058667a85.077333 85.077333 0 0 0-135.722666 65.024z" fill="#FFB531" p-id="11345"></path><path d="M329.728 274.133333l35.157333-35.157333a21.333333 21.333333 0 1 0-30.165333-30.165333l-35.157333 35.157333-35.114667-35.157333a21.333333 21.333333 0 0 0-30.165333 30.165333l35.114666 35.157333-35.114666 35.157334a21.333333 21.333333 0 1 0 30.165333 30.165333l35.114667-35.157333 35.157333 35.157333a21.333333 21.333333 0 1 0 30.165333-30.165333z" fill="#030835" p-id="11346"></path></symbol><symbol id="icon-moon" viewBox="0 0 1024 1024"><path d="M611.370667 167.082667a445.013333 445.013333 0 0 1-38.4 161.834666 477.824 477.824 0 0 1-244.736 244.394667 445.141333 445.141333 0 0 1-161.109334 38.058667 85.077333 85.077333 0 0 0-65.066666 135.722666A462.08 462.08 0 1 0 747.093333 102.058667a85.077333 85.077333 0 0 0-135.722666 65.024z" fill="#FFB531" p-id="11345"></path><path d="M329.728 274.133333l35.157333-35.157333a21.333333 21.333333 0 1 0-30.165333-30.165333l-35.157333 35.157333-35.114667-35.157333a21.333333 21.333333 0 0 0-30.165333 30.165333l35.114666 35.157333-35.114666 35.157334a21.333333 21.333333 0 1 0 30.165333 30.165333l35.114667-35.157333 35.157333 35.157333a21.333333 21.333333 0 1 0 30.165333-30.165333z" fill="#030835" p-id="11346"></path></symbol></svg><!-- hexo injector head_end start --><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiperstyle.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/assets/font-awesome-animation.min.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/tag_plugins.css" media="defer" onload="this.media='all'"><script src="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/assets/carousel-touch.js"></script><!-- hexo injector head_end end --><meta name="generator" content="Hexo 5.4.2"></head><body><div id="loading-box"><div class="pokeball-back"></div><div class="pokeball-loading"><div class="pokeball" id="pokeball-normal"></div><div class="pokeball" id="pokeball-great"></div><div class="pokeball" id="pokeball-ultra"></div><div class="pokeball" id="pokeball-master"></div><div class="pokeball" id="pokeball-safari"></div></div></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" data-lazy-src="https://thirdqq.qlogo.cn/g?b=sdk&amp;nk=2276839311&amp;s=140" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/web/archives/"><div class="headline">文章</div><div class="length-num">8</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/web/tags/"><div class="headline">标签</div><div class="length-num">9</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/web/categories/"><div class="headline">分类</div><div class="length-num">5</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/web/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/web/archives/"><i class="fa-fw fa fa-graduation-cap"></i><span> 博文</span></a></div><div class="menus_item"><a class="site-page" href="/web/sponsorWall/"><i class="fa-fw fas fa-images"></i><span> 赞助墙</span></a></div><div class="menus_item"><a class="site-page" href="/web/comment/"><i class="fa-fw fa fa-paper-plane"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/web/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/web/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="/web/other/"><i class="fa-fw fas fa-coffee"></i><span> Demo</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('/web/img/tab2.png')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/web/">前端攻城狮ZhuoRu</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/web/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/web/archives/"><i class="fa-fw fa fa-graduation-cap"></i><span> 博文</span></a></div><div class="menus_item"><a class="site-page" href="/web/sponsorWall/"><i class="fa-fw fas fa-images"></i><span> 赞助墙</span></a></div><div class="menus_item"><a class="site-page" href="/web/comment/"><i class="fa-fw fa fa-paper-plane"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/web/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/web/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="/web/other/"><i class="fa-fw fas fa-coffee"></i><span> Demo</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">话费充值平台总结</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-11-26T16:31:04.798Z" title="发表于 2022-11-27 00:31:04">2022-11-27</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2021-07-22T16:27:23.000Z" title="更新于 2021-07-23 00:27:23">2021-07-23</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/web/categories/%E7%BB%8F%E9%AA%8C%E6%80%BB%E7%BB%93/">经验总结</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">2.6k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>12分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="话费充值平台总结"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="1-修改子菜单"><a href="#1-修改子菜单" class="headerlink" title="1.修改子菜单"></a>1.修改子菜单</h1><h2 id="2-修改获取用户信息请求"><a href="#2-修改获取用户信息请求" class="headerlink" title="2.修改获取用户信息请求"></a>2.修改获取用户信息请求</h2><h3 id="3-修改const-accessRoutes-await-store-dispatch-‘permission-generateRoutes’"><a href="#3-修改const-accessRoutes-await-store-dispatch-‘permission-generateRoutes’" class="headerlink" title="3.修改const accessRoutes = await store.dispatch(‘permission/generateRoutes’)"></a>3.修改const accessRoutes = await store.dispatch(‘permission/generateRoutes’)</h3><p>根据方法名去替代请求，获取信息</p>
<h1 id="换成自己的项目的接口"><a href="#换成自己的项目的接口" class="headerlink" title="换成自己的项目的接口"></a>换成自己的项目的接口</h1><p>需要改密码</p>
<p>还有baseURL</p>
<p>改默认接口</p>
<p>改参数</p>
<p>修改response的默认状态码判</p>
<h1 id="Node-js局域网文件共享"><a href="#Node-js局域网文件共享" class="headerlink" title="Node.js局域网文件共享"></a>Node.js局域网文件共享</h1><p>关于node.js如何局域网共享文件，简单两步即可<br>首先安装http-server 包 输以下命令即可安装<br><code>npm install http-server -g</code> 安装包<br>然后在你要共享的文件夹下启动即可<br>输入 <code>http-server</code>即可成功启动。输出以下信息</p>
<h1 id="在内嵌的HTML页面中跳转回小程序"><a href="#在内嵌的HTML页面中跳转回小程序" class="headerlink" title="在内嵌的HTML页面中跳转回小程序"></a>在内嵌的HTML页面中跳转回小程序</h1><p>如果要在已经通过<code>&lt;web-view&gt;</code>嵌入小程序的网页中，跳转到小程序中的其他页面(Page)，可以引入微信的一个JSSDK，使用它提供的方法来实现相关跳转功能。网页代码类似如下所示</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 使用web-view组件显示HTML页面 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">web-view</span> <span class="attr">src</span>=<span class="string">&quot;https://www.xxxxxxxxx.com/index.html&quot;</span> /&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- html代码中引入JS SDK --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">&quot;text/javascript&quot;</span> <span class="attr">src</span>=<span class="string">&quot;https://res.wx.qq.com/open/js/jweixin-1.3.0.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"><span class="comment">// 跳转到小程序的一个页面</span></span></span><br><span class="line"><span class="language-javascript">wx.<span class="property">miniProgram</span>.<span class="title function_">navigateTo</span>(&#123;<span class="attr">url</span>: <span class="string">&#x27;/path/to/page&#x27;</span>&#125;)</span></span><br><span class="line"><span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="JSAPI调起支付"><a href="#JSAPI调起支付" class="headerlink" title="JSAPI调起支付"></a><a target="_blank" rel="noopener" href="https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_7&amp;index=6">JSAPI调起支付</a></h2><p><strong>支付授权目录校验规则说明</strong></p>
<p>1)如果支付授权目录设置为顶级域名（例如：<a target="_blank" rel="noopener" href="https://www.weixin.com/">https://www.weixin.com/</a> ），那么只校验顶级域名，不校验后缀；</p>
<p>2)如果支付授权目录设置为多级目录，就会进行全匹配，例如设置支付授权目录为<a target="_blank" rel="noopener" href="https://www.weixin.com/abc/123/，则实际请求页面目录不能为https://www.weixin.com/abc/，也不能为https://www.weixin.com/abc/123/pay/，必须为https://www.weixin.com/abc/123/">https://www.weixin.com/abc/123/，则实际请求页面目录不能为https://www.weixin.com/abc/，也不能为https://www.weixin.com/abc/123/pay/，必须为https://www.weixin.com/abc/123/</a></p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (res.<span class="property">err_msg</span> == <span class="string">&quot;get_brand_wcpay_request:ok&quot;</span>) &#123;</span><br><span class="line">    <span class="comment">//微信 自带 支付成功效果 跳转无效</span></span><br><span class="line">    <span class="title function_">alert</span>(<span class="string">&quot;支付成功&quot;</span>)</span><br><span class="line">    <span class="variable language_">window</span>.<span class="property">location</span>.<span class="property">href</span> = <span class="string">&#x27;../list.html&#x27;</span></span><br><span class="line">&#125; <span class="keyword">else</span> <span class="keyword">if</span> (res.<span class="property">err_msg</span> == <span class="string">&quot;get_brand_wcpay_request:cancel&quot;</span>) &#123;</span><br><span class="line">    <span class="title function_">alert</span>(<span class="string">&quot;用户取消支付!&quot;</span>);</span><br><span class="line">&#125; <span class="keyword">else</span> <span class="keyword">if</span> (res.<span class="property">err_msg</span> == <span class="string">&quot;get_brand_wcpay_request：fail&quot;</span>) &#123;</span><br><span class="line">    <span class="title function_">alert</span>(<span class="string">&quot;支付失败!&quot;</span>);</span><br><span class="line">&#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">alert</span>(res.<span class="property">errMsg</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h1 id="h5公众号页面需要console，可以使用vconsole打印"><a href="#h5公众号页面需要console，可以使用vconsole打印" class="headerlink" title="h5公众号页面需要console，可以使用vconsole打印"></a>h5公众号页面需要console，可以使用vconsole打印</h1><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;https://unpkg.com/vconsole/dist/vconsole.min.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">  <span class="comment">// VConsole will be exported to `window.VConsole` by default.</span></span></span><br><span class="line"><span class="language-javascript">  <span class="keyword">var</span> vConsole = <span class="keyword">new</span> <span class="variable language_">window</span>.<span class="title class_">VConsole</span>();</span></span><br><span class="line"><span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h1 id="vue-element-通过checkbox控制el-table-column的显示或隐藏el-table-column隐藏"><a href="#vue-element-通过checkbox控制el-table-column的显示或隐藏el-table-column隐藏" class="headerlink" title="vue+element 通过checkbox控制el-table-column的显示或隐藏el-table-column隐藏"></a><a target="_blank" rel="noopener" href="https://blog.csdn.net/qq_36802726/article/details/91875898">vue+element 通过checkbox控制el-table-column的显示或隐藏el-table-column隐藏</a></h1><h5 id="什么都做不到的人，会拼命寻找自己能做得到的事情！-我也要找到，我想做什么，我能做什么。。。"><a href="#什么都做不到的人，会拼命寻找自己能做得到的事情！-我也要找到，我想做什么，我能做什么。。。" class="headerlink" title="什么都做不到的人，会拼命寻找自己能做得到的事情！ 我也要找到，我想做什么，我能做什么。。。"></a>什么都做不到的人，会拼命寻找自己能做得到的事情！ 我也要找到，我想做什么，我能做什么。。。</h5><h5 id="无论是十年前还是十年后，时间都是有限的。这么理想当然的事，为什么我没有发觉呢？为了不后悔行动起来，不然一切都不会改变！、"><a href="#无论是十年前还是十年后，时间都是有限的。这么理想当然的事，为什么我没有发觉呢？为了不后悔行动起来，不然一切都不会改变！、" class="headerlink" title="无论是十年前还是十年后，时间都是有限的。这么理想当然的事，为什么我没有发觉呢？为了不后悔行动起来，不然一切都不会改变！、"></a>无论是十年前还是十年后，时间都是有限的。这么理想当然的事，为什么我没有发觉呢？为了不后悔行动起来，不然一切都不会改变！、</h5><h1 id="vant引入"><a href="#vant引入" class="headerlink" title="vant引入"></a><a target="_blank" rel="noopener" href="https://vant-contrib.gitee.io/vant/#/zh-CN/quickstart">vant引入</a></h1><h1 id="rem引入"><a href="#rem引入" class="headerlink" title="rem引入"></a>rem引入</h1><ol>
<li><p>npm install amfe-flexible —save</p>
</li>
<li><p>npm install postcss-pxtorem —save</p>
</li>
<li><p>在main.js导入amfe-flexible</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">import &#x27;amfe-flexible&#x27;;</span><br></pre></td></tr></table></figure>
</li>
<li><p>vue.config.js</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable language_">module</span>.<span class="property">exports</span> = &#123;</span><br><span class="line">  <span class="attr">css</span>: &#123;</span><br><span class="line">    <span class="attr">loaderOptions</span>: &#123;</span><br><span class="line">      <span class="attr">postcss</span>: &#123;</span><br><span class="line">        <span class="attr">plugins</span>: [</span><br><span class="line">          <span class="built_in">require</span>(<span class="string">&#x27;postcss-pxtorem&#x27;</span>)(&#123; <span class="comment">// 把px单位换算成rem单位</span></span><br><span class="line">            <span class="attr">rootValue</span>: <span class="number">37.5</span>, <span class="comment">// 换算的基数(设计图750的根字体为32)</span></span><br><span class="line">            <span class="attr">selectorBlackList</span>: [<span class="string">&#x27;weui&#x27;</span>, <span class="string">&#x27;mu&#x27;</span>], <span class="comment">// 忽略转换正则匹配项</span></span><br><span class="line">            <span class="attr">propList</span>: [<span class="string">&#x27;*&#x27;</span>]</span><br><span class="line">          &#125;)</span><br><span class="line">        ]</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ol>
<ul>
<li><p>rootValue根据设计稿宽度除以10进行设置，这边假设设计稿为375，即rootValue设为37.5；</p>
</li>
<li><p>propList是设置需要转换的属性，这边*为所有都进行转换。</p>
<h1 id="对于这样的情况，-lt-slot-gt-元素有一个特殊的-attribute：name。这个-attribute-可以用来定义额外的插槽："><a href="#对于这样的情况，-lt-slot-gt-元素有一个特殊的-attribute：name。这个-attribute-可以用来定义额外的插槽：" class="headerlink" title="对于这样的情况，&lt;slot&gt; 元素有一个特殊的 attribute：name。这个 attribute 可以用来定义额外的插槽："></a>对于这样的情况，<code>&lt;slot&gt;</code> 元素有一个特殊的 attribute：<code>name</code>。这个 attribute 可以用来定义额外的插槽：</h1><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container&quot;</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">header</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">slot</span> <span class="attr">name</span>=<span class="string">&quot;header&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">slot</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">header</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">main</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">slot</span>&gt;</span><span class="tag">&lt;/<span class="name">slot</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">main</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">footer</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">slot</span> <span class="attr">name</span>=<span class="string">&quot;footer&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">slot</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">footer</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>一个不带 <code>name</code> 的 <code>&lt;slot&gt;</code> 出口会带有隐含的名字“default”。</p>
<p>在向具名插槽提供内容的时候，我们可以在一个 <code>&lt;template&gt;</code> 元素上使用 <code>v-slot</code> 指令，并以 <code>v-slot</code> 的参数的形式提供其名称：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">base-layout</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">template</span> <span class="attr">v-slot:header</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">h1</span>&gt;</span>Here might be a page title<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">template</span>&gt;</span></span><br><span class="line"></span><br><span class="line">  <span class="tag">&lt;<span class="name">template</span> <span class="attr">v-slot:default</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span>&gt;</span>A paragraph for the main content.<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span>&gt;</span>And another one.<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">template</span>&gt;</span></span><br><span class="line"></span><br><span class="line">  <span class="tag">&lt;<span class="name">template</span> <span class="attr">v-slot:footer</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span>&gt;</span>Here&#x27;s some contact info<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">template</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">base-layout</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>现在 <code>&lt;template&gt;</code> 元素中的所有内容都将会被传入相应的插槽。</p>
<p>渲染的 HTML 将会是：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container&quot;</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">header</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">h1</span>&gt;</span>Here might be a page title<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">header</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">main</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span>&gt;</span>A paragraph for the main content.<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span>&gt;</span>And another one.<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">main</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">footer</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span>&gt;</span>Here&#x27;s some contact info<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">footer</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>注意，<code>v-slot</code> 只能添加在 <code>&lt;template&gt;</code> 上 (<a target="_blank" rel="noopener" href="https://vue3js.cn/docs/zh/guide/component-slots.html#独占默认插槽的缩写语法">只有一种例外情况</a>)</p>
</li>
</ul>
<h1 id="jq技巧"><a href="#jq技巧" class="headerlink" title="jq技巧"></a>jq技巧</h1><p>切图技巧：右键快速导出png，jpg</p>
<p>css编写：以一个成型的模块为模板，解决文字大小参差不齐问题（前期使用vw），行高也要统一对齐</p>
<p>图片需要完全展示，不可变型</p>
<p>使用不同手机端检查网站，手机强制刷新需要到设置去清除缓存后退出浏览器，</p>
<p>背景需要铺满就cover，不好看就隐藏背景</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 简单事件触发，触发 click事件</span></span><br><span class="line"><span class="comment">//新闻列表点击文本不能跳转事件，解决方法给父级li添加点击跳转到子便签a链接的事件</span></span><br><span class="line">$(<span class="string">&#x27;.box-news .NewsList_g2&#x27;</span>).<span class="title function_">on</span>(<span class="string">&#x27;click&#x27;</span>,<span class="string">&#x27;li&#x27;</span>,<span class="keyword">function</span>(<span class="params"></span>)&#123;</span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>($(<span class="variable language_">this</span>).<span class="title function_">find</span>(<span class="string">&quot;h3 a&quot;</span>).<span class="title function_">attr</span>(<span class="string">&#x27;href&#x27;</span>))</span><br><span class="line">    $(location).<span class="title function_">attr</span>(<span class="string">&#x27;href&#x27;</span>, $(<span class="variable language_">this</span>).<span class="title function_">find</span>(<span class="string">&quot;h3 a&quot;</span>).<span class="title function_">attr</span>(<span class="string">&#x27;href&#x27;</span>));</span><br><span class="line">    <span class="comment">// $(&#x27;.box-news .NewsList_g2 li&#x27;).eq(0).find(&quot;h3 a&quot;).attributes[&quot;href&quot;].value</span></span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">当公司组件结构不对时，使用js替换节点，改变公司组件结构</span><br><span class="line"><span class="keyword">for</span>(i=<span class="number">0</span>;i&lt;$(<span class="string">&#x27;.box-news .NewsList_g2 li&#x27;</span>).<span class="property">length</span>;i++)&#123;</span><br><span class="line">    <span class="keyword">let</span> p1= $(<span class="string">&#x27;.box-news .NewsList_g2 li&#x27;</span>).<span class="title function_">eq</span>(i).<span class="title function_">find</span>(<span class="string">&quot;p&quot;</span>).<span class="title function_">eq</span>(<span class="number">0</span>) <span class="comment">//  获取&lt;li&gt;节点中第一个&lt;p&gt;元素节点</span></span><br><span class="line">    <span class="keyword">let</span> p2= $(<span class="string">&#x27;.box-news .NewsList_g2 li&#x27;</span>).<span class="title function_">eq</span>(i).<span class="title function_">find</span>(<span class="string">&quot;p&quot;</span>).<span class="title function_">eq</span>(<span class="number">1</span>) <span class="comment">//  获取&lt;li&gt;节点中第二个&lt;p&gt;元素节点</span></span><br><span class="line">    p2.<span class="title function_">insertBefore</span>(p1);    <span class="comment">//替换节点</span></span><br><span class="line">    <span class="comment">// console.log($(&#x27;.box-news .NewsList_g2 li&#x27;).eq(i).find(&quot;p&quot;).eq(0))</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p> 自适应网页界面在屏幕宽度为1920px，1600px，1440px，1366px，1280px，800px，750px显示正常。</p>
<p>首页主要包含关于模块：logo，公司名48px，简介16px，</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;mobsnav&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">&quot;sort_btn mob&quot;</span>&gt;</span>产品分类<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;NavList_a1&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//子导航组件横转下拉样式加js</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//下拉二级菜单</span></span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">var</span> a=$(<span class="string">&#x27;.NavList_a1 .on&#x27;</span>).<span class="title function_">text</span>();</span></span><br><span class="line"><span class="language-javascript">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;a&#x27;</span>,a,$(<span class="string">&#x27;.NavList_a1 .on&#x27;</span>))</span></span><br><span class="line"><span class="language-javascript">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;a&#x27;</span>,a,$(<span class="string">&#x27;.NavList_a1&#x27;</span>))</span></span><br><span class="line"><span class="language-javascript">    $(<span class="string">&#x27;.sort_btn&#x27;</span>).<span class="title function_">html</span>(a);</span></span><br><span class="line"><span class="language-javascript">    $(<span class="string">&quot;.sort_btn&quot;</span>).<span class="title function_">click</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span></span><br><span class="line"><span class="language-javascript">        $(<span class="string">&quot;.NavList_a1&quot;</span>).<span class="title function_">slideToggle</span>();</span></span><br><span class="line"><span class="language-javascript">    &#125;);</span></span><br><span class="line"><span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">640px</span>)&#123;</span></span><br><span class="line"><span class="language-css">        <span class="selector-class">.mobsnav</span> <span class="selector-class">.sort_btn</span> &#123;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">display</span>: block;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">border-bottom</span>: <span class="number">1px</span> solid <span class="number">#cdcdcd</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">line-height</span>: <span class="number">1.8</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">padding</span>: <span class="number">3vw</span> <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">font-size</span>: <span class="number">4vw</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">padding</span>: <span class="number">0.5em</span> <span class="number">12%</span> <span class="number">0.5em</span> <span class="number">3%</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">background</span>: <span class="built_in">url</span>(<span class="string">./images/d.png</span>) <span class="number">95%</span> center no-repeat;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">background-size</span>: auto <span class="number">5px</span>;</span></span><br><span class="line"><span class="language-css">        &#125;</span></span><br><span class="line"><span class="language-css">        <span class="selector-class">.mobsnav</span> <span class="selector-class">.NavList_a1</span> &#123;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">width</span>: <span class="number">100%</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">z-index</span>: <span class="number">2</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">display</span>: none;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">overflow</span>: hidden;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">padding</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">position</span>: absolute;</span></span><br><span class="line"><span class="language-css">            <span class="comment">/* bottom: -100%; */</span></span></span><br><span class="line"><span class="language-css">            <span class="attribute">background</span>: <span class="number">#efefef</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">z-index</span>: <span class="number">1</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">height</span>: <span class="number">45vw</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">overflow</span>: auto;</span></span><br><span class="line"><span class="language-css">        &#125;</span></span><br><span class="line"><span class="language-css">        <span class="selector-class">.mobsnav</span> <span class="selector-class">.NavList_a1</span> <span class="selector-tag">li</span> &#123;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">margin</span>: <span class="number">0</span> auto;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">text-align</span>: left;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">display</span>: block;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">width</span>: <span class="number">100%</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">border-bottom</span>: <span class="number">1px</span> solid <span class="number">#efefef</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">padding</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">line-height</span>: <span class="number">1.5</span>;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">list-style</span>: none;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">box-sizing</span>: border-box;</span></span><br><span class="line"><span class="language-css">        &#125;</span></span><br><span class="line"><span class="language-css">    &#125;</span></span><br><span class="line"><span class="language-css"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br></pre></td></tr></table></figure>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//子导航组件横加滚动效果的js</span></span><br><span class="line">$(<span class="string">&quot;.NavList_a1&quot;</span>).<span class="title function_">addClass</span>(<span class="string">&quot;swiper-container&quot;</span>);</span><br><span class="line">$(<span class="string">&quot;.NavList_a1 ul&quot;</span>).<span class="title function_">addClass</span>(<span class="string">&quot;swiper-wrapper&quot;</span>);</span><br><span class="line">$(<span class="string">&quot;.NavList_a1 ul li&quot;</span>).<span class="title function_">addClass</span>(<span class="string">&quot;swiper-slide&quot;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> <span class="title class_">Class</span>_Swiper = <span class="keyword">new</span> <span class="title class_">Swiper</span> (<span class="string">&#x27;.NavList_a1&#x27;</span>, &#123;</span><br><span class="line">freeMode : <span class="literal">true</span>,</span><br><span class="line">slidesPerView : <span class="string">&#x27;auto&#x27;</span>,</span><br><span class="line"><span class="attr">observer</span>:<span class="literal">true</span>,</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//手机端菜单栏组件横加子菜单下拉事件的js</span></span><br><span class="line"><span class="keyword">if</span> ( rw &gt; <span class="number">1125</span>)&#123;</span><br><span class="line">    &#125;<span class="keyword">else</span>&#123;</span><br><span class="line">        $(<span class="string">&quot;.MenuList_f1&quot;</span>).<span class="title function_">addClass</span>(<span class="string">&#x27;hide&#x27;</span>);</span><br><span class="line">        <span class="keyword">var</span> fMenu= $(<span class="string">&#x27;.MenuList_f1 .drop&#x27;</span>);</span><br><span class="line">        fMenu.<span class="title function_">click</span>(<span class="keyword">function</span>(<span class="params">e</span>)&#123;</span><br><span class="line">            <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="number">0</span>,$(<span class="variable language_">this</span>).<span class="title function_">parent</span>().<span class="title function_">parent</span>().<span class="property">context</span>.<span class="property">innerText</span>)</span><br><span class="line">            <span class="keyword">if</span>($(<span class="variable language_">this</span>).<span class="title function_">parent</span>().<span class="title function_">parent</span>().<span class="property">context</span>.<span class="property">innerText</span>==<span class="string">&#x27;产品中心&#x27;</span>)&#123;</span><br><span class="line">            	<span class="variable language_">window</span>.<span class="title function_">navigate</span>(<span class="string">&quot;product_list.php?rid=9&quot;</span>);</span><br><span class="line">            &#125;</span><br><span class="line">            <span class="keyword">else</span> <span class="keyword">if</span>($(<span class="variable language_">this</span>).<span class="title function_">parent</span>().<span class="title function_">parent</span>().<span class="title function_">find</span>(<span class="string">&#x27;ul li&#x27;</span>).<span class="property">length</span> != <span class="number">0</span>)&#123;</span><br><span class="line">                e.<span class="title function_">preventDefault</span>();</span><br><span class="line">                <span class="keyword">if</span>($(<span class="variable language_">this</span>).<span class="title function_">parent</span>().<span class="title function_">parent</span>().<span class="title function_">hasClass</span>(<span class="string">&#x27;cur&#x27;</span>))&#123;</span><br><span class="line">                    $(<span class="variable language_">this</span>).<span class="title function_">parent</span>().<span class="title function_">parent</span>().<span class="title function_">removeClass</span>(<span class="string">&#x27;cur&#x27;</span>);  </span><br><span class="line">                    $(<span class="variable language_">this</span>).<span class="title function_">parent</span>().<span class="title function_">parent</span>().<span class="title function_">find</span>(<span class="string">&quot;.child&quot;</span>).<span class="title function_">stop</span>(<span class="literal">true</span>,<span class="literal">true</span>).<span class="title function_">hide</span>();</span><br><span class="line">                &#125;<span class="keyword">else</span>&#123;</span><br><span class="line">                    $(<span class="variable language_">this</span>).<span class="title function_">parent</span>().<span class="title function_">parent</span>().<span class="title function_">find</span>(<span class="string">&quot;.child&quot;</span>).<span class="title function_">slideDown</span>();</span><br><span class="line">                    $(<span class="string">&#x27;.cur&#x27;</span>).<span class="title function_">removeClass</span>(<span class="string">&quot;cur&quot;</span>);</span><br><span class="line">                    $(<span class="variable language_">this</span>).<span class="title function_">parent</span>().<span class="title function_">parent</span>().<span class="title function_">addClass</span>(<span class="string">&#x27;cur&#x27;</span>);</span><br><span class="line">                    $(<span class="string">&#x27;.cur&#x27;</span>).<span class="title function_">siblings</span>().<span class="title function_">find</span>(<span class="string">&quot;.child&quot;</span>).<span class="title function_">hide</span>();</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;)</span><br><span class="line"></span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">//一键导航制作加个a标签，加点</span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;fr contact_img&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">&quot;map-btn&quot;</span> <span class="attr">href</span>=<span class="string">&quot;http://wxdev.pbinfo.cn/open/map/nav.php?navstr=Cy4NQUiZWzWq3bCoj4hffwXCK0_ocpMC-Qln_9CrlcrDaxypQD6xpHKdwLT_O_LDyf-YHtEJ3miI9_Aa7Dp3HFgqi7-cecXZxB1SU38AoHpJq7xmn0BNBB9zGYTcmZ4m7AK38-AvYGGthGwW9fbStLP5Y4aBciKh2qc1zlMZWGA1TIAppfqVmHj7aXs&quot;</span>&gt;</span>一键导航<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    &lt;? getMapList(&#x27;a1&#x27;,15) ?&gt;</span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.map-btn</span> &#123;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">width</span>: <span class="number">8em</span>;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">text-align</span>: center;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">display</span>: none;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">background</span>: <span class="number">#002e73</span>;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">color</span>: <span class="number">#fff</span>;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">font-size</span>: <span class="number">3.8vw</span>;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">margin</span>: <span class="number">6vw</span> auto <span class="number">0</span> auto;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">padding</span>: <span class="number">1.5vw</span> <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">border-radius</span>: <span class="number">5vw</span>;</span></span><br><span class="line"><span class="language-css">    &#125;</span></span><br><span class="line"><span class="language-css">    //手机端隐藏地图，显示一键导航按钮</span></span><br><span class="line"><span class="language-css">	<span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">640px</span>)&#123;</span></span><br><span class="line"><span class="language-css">        <span class="selector-class">.map-btn</span> &#123;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">display</span>: block;</span></span><br><span class="line"><span class="language-css">        &#125;</span></span><br><span class="line"><span class="language-css">        <span class="selector-class">.map_a1</span> &#123;</span></span><br><span class="line"><span class="language-css">            <span class="attribute">display</span>: none;</span></span><br><span class="line"><span class="language-css">        &#125;</span></span><br><span class="line"><span class="language-css">    &#125;</span></span><br><span class="line"><span class="language-css"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br></pre></td></tr></table></figure>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 定制新闻</span></span><br><span class="line"><span class="comment">// console.log(&#x27;定制新闻&#x27;,$(&#x27;.box-news .NewsList_g2 li .ntime&#x27;)[1])</span></span><br><span class="line"><span class="keyword">for</span>(i=<span class="number">0</span>;i&lt;$(<span class="string">&#x27;.box_news .NewsList_g2 li&#x27;</span>).<span class="property">length</span>;i++)&#123;</span><br><span class="line">    <span class="comment">// let p1= $(&#x27;.box_news .NewsList_g2 li&#x27;).eq(i).find(&quot;p&quot;).eq(0) //  获取&lt;li&gt;节点中第一个&lt;p&gt;元素节点</span></span><br><span class="line">    <span class="keyword">let</span> p2= $(<span class="string">&#x27;.box_news .NewsList_g2 li&#x27;</span>).<span class="title function_">eq</span>(i).<span class="title function_">find</span>(<span class="string">&quot;p&quot;</span>).<span class="title function_">eq</span>(<span class="number">0</span>)[<span class="number">0</span>].<span class="property">innerHTML</span>.<span class="title function_">replace</span>(<span class="regexp">/时间:/</span>,<span class="string">&quot;&quot;</span>) <span class="comment">//  获取&lt;li&gt;节点中第二个&lt;p&gt;元素节点</span></span><br><span class="line">    <span class="comment">// p2.insertBefore(p1);    //移动节点\</span></span><br><span class="line">    $(<span class="string">&#x27;.box_news .NewsList_g2 li&#x27;</span>).<span class="title function_">eq</span>(i).<span class="title function_">find</span>(<span class="string">&quot;p&quot;</span>).<span class="title function_">eq</span>(<span class="number">2</span>).<span class="title function_">text</span>(<span class="string">&#x27;MORE&#x27;</span>)</span><br><span class="line">    $(<span class="string">&#x27;.box_news .NewsList_g2 li&#x27;</span>).<span class="title function_">eq</span>(i).<span class="title function_">find</span>(<span class="string">&quot;p&quot;</span>).<span class="title function_">eq</span>(<span class="number">2</span>).<span class="title function_">addClass</span>(<span class="string">&quot;newsmore&quot;</span>);</span><br><span class="line">    $(<span class="string">&#x27;.box_news .NewsList_g2 li&#x27;</span>).<span class="title function_">eq</span>(i).<span class="title function_">find</span>(<span class="string">&quot;p&quot;</span>).<span class="title function_">eq</span>(<span class="number">1</span>).<span class="title function_">addClass</span>(<span class="string">&quot;mt-50&quot;</span>);</span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;定制新闻&#x27;</span>,p2)</span><br><span class="line">    <span class="keyword">let</span> date = <span class="keyword">new</span> <span class="title class_">Date</span>(p2)</span><br><span class="line">    <span class="keyword">let</span> year = <span class="title function_">dateFormat</span>(<span class="string">&quot;YYYY-mm&quot;</span>, date)</span><br><span class="line">    <span class="keyword">let</span> day = <span class="title function_">dateFormat</span>(<span class="string">&quot;dd&quot;</span>, date)</span><br><span class="line">    <span class="comment">// console.log(&#x27;定制新闻&#x27;,year,day)</span></span><br><span class="line">    $(<span class="string">&#x27;.box_news .NewsList_g2 li&#x27;</span>).<span class="title function_">eq</span>(i).<span class="title function_">prepend</span>(<span class="string">`&lt;div class=&quot;timebox&quot;&gt;</span></span><br><span class="line"><span class="string">        &lt;div class=&quot;day&quot;&gt;<span class="subst">$&#123;day&#125;</span>&lt;/div&gt;</span></span><br><span class="line"><span class="string">        &lt;div class=&quot;year&quot;&gt;<span class="subst">$&#123;year&#125;</span>&lt;/div&gt;</span></span><br><span class="line"><span class="string">    &lt;/div&gt;`</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">dateFormat</span>(<span class="params">fmt, date</span>) &#123;</span><br><span class="line">    <span class="keyword">let</span> ret;</span><br><span class="line">    <span class="keyword">const</span> opt = &#123;</span><br><span class="line">        <span class="string">&quot;Y+&quot;</span>: date.<span class="title function_">getFullYear</span>().<span class="title function_">toString</span>(),        <span class="comment">// 年</span></span><br><span class="line">        <span class="string">&quot;m+&quot;</span>: (date.<span class="title function_">getMonth</span>() + <span class="number">1</span>).<span class="title function_">toString</span>(),     <span class="comment">// 月</span></span><br><span class="line">        <span class="string">&quot;d+&quot;</span>: date.<span class="title function_">getDate</span>().<span class="title function_">toString</span>(),            <span class="comment">// 日</span></span><br><span class="line">        <span class="string">&quot;H+&quot;</span>: date.<span class="title function_">getHours</span>().<span class="title function_">toString</span>(),           <span class="comment">// 时</span></span><br><span class="line">        <span class="string">&quot;M+&quot;</span>: date.<span class="title function_">getMinutes</span>().<span class="title function_">toString</span>(),         <span class="comment">// 分</span></span><br><span class="line">        <span class="string">&quot;S+&quot;</span>: date.<span class="title function_">getSeconds</span>().<span class="title function_">toString</span>()          <span class="comment">// 秒</span></span><br><span class="line">        <span class="comment">// 有其他格式化字符需求可以继续添加，必须转化成字符串</span></span><br><span class="line">    &#125;;</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">let</span> k <span class="keyword">in</span> opt) &#123;</span><br><span class="line">        ret = <span class="keyword">new</span> <span class="title class_">RegExp</span>(<span class="string">&quot;(&quot;</span> + k + <span class="string">&quot;)&quot;</span>).<span class="title function_">exec</span>(fmt);</span><br><span class="line">        <span class="keyword">if</span> (ret) &#123;</span><br><span class="line">            fmt = fmt.<span class="title function_">replace</span>(ret[<span class="number">1</span>], (ret[<span class="number">1</span>].<span class="property">length</span> == <span class="number">1</span>) ? (opt[k]) : (opt[k].<span class="title function_">padStart</span>(ret[<span class="number">1</span>].<span class="property">length</span>, <span class="string">&quot;0&quot;</span>)))</span><br><span class="line">        &#125;;</span><br><span class="line">    &#125;;</span><br><span class="line">    <span class="keyword">return</span> fmt;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h1 id="菜鸡技巧"><a href="#菜鸡技巧" class="headerlink" title="菜鸡技巧"></a>菜鸡技巧</h1><p>修改颜色样式时需ctrl+F5刷新方可看到效果</p>
<p><strong><em>英文版座机手机都要加+86—</em></strong>``</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">ZhuoRu</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://zhangzhuoru.gitee.io/web/post/1024.html">https://zhangzhuoru.gitee.io/web/post/1024.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://zhangzhuoru.gitee.io/web" target="_blank">前端攻城狮ZhuoRu</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/web/tags/vue/">vue</a><a class="post-meta__tags" href="/web/tags/%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%8F%B7/">微信公众号</a><a class="post-meta__tags" href="/web/tags/h5/">h5</a></div><div class="post_share"><div class="social-share" data-image="/web/img/tab2.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button button--animated"><i class="fas fa-qrcode"></i> 打赏</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/web/./img/wechat.png" target="_blank"><img class="post-qr-code-img" data-lazy-src="/web/./img/wechat.png" alt="微信"/></a><div class="post-qr-code-desc">微信</div></li><li class="reward-item"><a href="/web/./img/alipay.jpg" target="_blank"><img class="post-qr-code-img" data-lazy-src="/web/./img/alipay.jpg" alt="支付寶"/></a><div class="post-qr-code-desc">支付寶</div></li></ul></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/web/post/1666.html"><img class="prev-cover" data-lazy-src="/web/img/tab4.png" onerror="onerror=null;src='/web/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">个人简历大全 😘</div></div></a></div><div class="next-post pull-right"><a href="/web/post/16106.html"><img class="next-cover" data-lazy-src="/web/img/tab99.png" onerror="onerror=null;src='/web/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">填坑录</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span> 相关推荐</span></div><div class="relatedPosts-list"><div><a href="/web/post/1026.html" title="Vue3学习总结"><img class="cover" data-lazy-src="/web/img/tab99.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-11-27</div><div class="title">Vue3学习总结</div></div></a></div></div></div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" data-lazy-src="https://thirdqq.qlogo.cn/g?b=sdk&amp;nk=2276839311&amp;s=140" onerror="this.onerror=null;this.src='/web/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">ZhuoRu</div><div class="author-info__description"></div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/web/archives/"><div class="headline">文章</div><div class="length-num">8</div></a></div><div class="card-info-data-item is-center"><a href="/web/tags/"><div class="headline">标签</div><div class="length-num">9</div></a></div><div class="card-info-data-item is-center"><a href="/web/categories/"><div class="headline">分类</div><div class="length-num">5</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/WebZhuoRu"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/WebZhuoRu" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:2276839311@qq.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="https://webzhuoru.github.io/" target="_blank" title="博客"><i class="fa-solid fa-book-skull"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#1-%E4%BF%AE%E6%94%B9%E5%AD%90%E8%8F%9C%E5%8D%95"><span class="toc-number">1.</span> <span class="toc-text">1.修改子菜单</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#2-%E4%BF%AE%E6%94%B9%E8%8E%B7%E5%8F%96%E7%94%A8%E6%88%B7%E4%BF%A1%E6%81%AF%E8%AF%B7%E6%B1%82"><span class="toc-number">1.1.</span> <span class="toc-text">2.修改获取用户信息请求</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#3-%E4%BF%AE%E6%94%B9const-accessRoutes-await-store-dispatch-%E2%80%98permission-generateRoutes%E2%80%99"><span class="toc-number">1.1.1.</span> <span class="toc-text">3.修改const accessRoutes &#x3D; await store.dispatch(‘permission&#x2F;generateRoutes’)</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%8D%A2%E6%88%90%E8%87%AA%E5%B7%B1%E7%9A%84%E9%A1%B9%E7%9B%AE%E7%9A%84%E6%8E%A5%E5%8F%A3"><span class="toc-number">2.</span> <span class="toc-text">换成自己的项目的接口</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Node-js%E5%B1%80%E5%9F%9F%E7%BD%91%E6%96%87%E4%BB%B6%E5%85%B1%E4%BA%AB"><span class="toc-number">3.</span> <span class="toc-text">Node.js局域网文件共享</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%9C%A8%E5%86%85%E5%B5%8C%E7%9A%84HTML%E9%A1%B5%E9%9D%A2%E4%B8%AD%E8%B7%B3%E8%BD%AC%E5%9B%9E%E5%B0%8F%E7%A8%8B%E5%BA%8F"><span class="toc-number">4.</span> <span class="toc-text">在内嵌的HTML页面中跳转回小程序</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#JSAPI%E8%B0%83%E8%B5%B7%E6%94%AF%E4%BB%98"><span class="toc-number">4.1.</span> <span class="toc-text">JSAPI调起支付</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#h5%E5%85%AC%E4%BC%97%E5%8F%B7%E9%A1%B5%E9%9D%A2%E9%9C%80%E8%A6%81console%EF%BC%8C%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8vconsole%E6%89%93%E5%8D%B0"><span class="toc-number">5.</span> <span class="toc-text">h5公众号页面需要console，可以使用vconsole打印</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#vue-element-%E9%80%9A%E8%BF%87checkbox%E6%8E%A7%E5%88%B6el-table-column%E7%9A%84%E6%98%BE%E7%A4%BA%E6%88%96%E9%9A%90%E8%97%8Fel-table-column%E9%9A%90%E8%97%8F"><span class="toc-number">6.</span> <span class="toc-text">vue+element 通过checkbox控制el-table-column的显示或隐藏el-table-column隐藏</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#%E4%BB%80%E4%B9%88%E9%83%BD%E5%81%9A%E4%B8%8D%E5%88%B0%E7%9A%84%E4%BA%BA%EF%BC%8C%E4%BC%9A%E6%8B%BC%E5%91%BD%E5%AF%BB%E6%89%BE%E8%87%AA%E5%B7%B1%E8%83%BD%E5%81%9A%E5%BE%97%E5%88%B0%E7%9A%84%E4%BA%8B%E6%83%85%EF%BC%81-%E6%88%91%E4%B9%9F%E8%A6%81%E6%89%BE%E5%88%B0%EF%BC%8C%E6%88%91%E6%83%B3%E5%81%9A%E4%BB%80%E4%B9%88%EF%BC%8C%E6%88%91%E8%83%BD%E5%81%9A%E4%BB%80%E4%B9%88%E3%80%82%E3%80%82%E3%80%82"><span class="toc-number">6.0.0.0.1.</span> <span class="toc-text">什么都做不到的人，会拼命寻找自己能做得到的事情！ 我也要找到，我想做什么，我能做什么。。。</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#%E6%97%A0%E8%AE%BA%E6%98%AF%E5%8D%81%E5%B9%B4%E5%89%8D%E8%BF%98%E6%98%AF%E5%8D%81%E5%B9%B4%E5%90%8E%EF%BC%8C%E6%97%B6%E9%97%B4%E9%83%BD%E6%98%AF%E6%9C%89%E9%99%90%E7%9A%84%E3%80%82%E8%BF%99%E4%B9%88%E7%90%86%E6%83%B3%E5%BD%93%E7%84%B6%E7%9A%84%E4%BA%8B%EF%BC%8C%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E6%B2%A1%E6%9C%89%E5%8F%91%E8%A7%89%E5%91%A2%EF%BC%9F%E4%B8%BA%E4%BA%86%E4%B8%8D%E5%90%8E%E6%82%94%E8%A1%8C%E5%8A%A8%E8%B5%B7%E6%9D%A5%EF%BC%8C%E4%B8%8D%E7%84%B6%E4%B8%80%E5%88%87%E9%83%BD%E4%B8%8D%E4%BC%9A%E6%94%B9%E5%8F%98%EF%BC%81%E3%80%81"><span class="toc-number">6.0.0.0.2.</span> <span class="toc-text">无论是十年前还是十年后，时间都是有限的。这么理想当然的事，为什么我没有发觉呢？为了不后悔行动起来，不然一切都不会改变！、</span></a></li></ol></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#vant%E5%BC%95%E5%85%A5"><span class="toc-number">7.</span> <span class="toc-text">vant引入</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#rem%E5%BC%95%E5%85%A5"><span class="toc-number">8.</span> <span class="toc-text">rem引入</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%AF%B9%E4%BA%8E%E8%BF%99%E6%A0%B7%E7%9A%84%E6%83%85%E5%86%B5%EF%BC%8C-lt-slot-gt-%E5%85%83%E7%B4%A0%E6%9C%89%E4%B8%80%E4%B8%AA%E7%89%B9%E6%AE%8A%E7%9A%84-attribute%EF%BC%9Aname%E3%80%82%E8%BF%99%E4%B8%AA-attribute-%E5%8F%AF%E4%BB%A5%E7%94%A8%E6%9D%A5%E5%AE%9A%E4%B9%89%E9%A2%9D%E5%A4%96%E7%9A%84%E6%8F%92%E6%A7%BD%EF%BC%9A"><span class="toc-number">9.</span> <span class="toc-text">对于这样的情况，&lt;slot&gt; 元素有一个特殊的 attribute：name。这个 attribute 可以用来定义额外的插槽：</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#jq%E6%8A%80%E5%B7%A7"><span class="toc-number">10.</span> <span class="toc-text">jq技巧</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E8%8F%9C%E9%B8%A1%E6%8A%80%E5%B7%A7"><span class="toc-number">11.</span> <span class="toc-text">菜鸡技巧</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/web/post/1026.html" title="Vue3学习总结"><img data-lazy-src="/web/img/tab99.png" onerror="this.onerror=null;this.src='/web/img/404.jpg'" alt="Vue3学习总结"/></a><div class="content"><a class="title" href="/web/post/1026.html" title="Vue3学习总结">Vue3学习总结</a><time datetime="2022-11-26T16:31:04.834Z" title="发表于 2022-11-27 00:31:04">2022-11-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/web/post/1666.html" title="个人简历大全 😘"><img data-lazy-src="/web/img/tab4.png" onerror="this.onerror=null;this.src='/web/img/404.jpg'" alt="个人简历大全 😘"/></a><div class="content"><a class="title" href="/web/post/1666.html" title="个人简历大全 😘">个人简历大全 😘</a><time datetime="2022-11-26T16:31:04.810Z" title="发表于 2022-11-27 00:31:04">2022-11-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/web/post/1024.html" title="话费充值平台总结"><img data-lazy-src="/web/img/tab2.png" onerror="this.onerror=null;this.src='/web/img/404.jpg'" alt="话费充值平台总结"/></a><div class="content"><a class="title" href="/web/post/1024.html" title="话费充值平台总结">话费充值平台总结</a><time datetime="2022-11-26T16:31:04.798Z" title="发表于 2022-11-27 00:31:04">2022-11-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/web/post/16106.html" title="填坑录"><img data-lazy-src="/web/img/tab99.png" onerror="this.onerror=null;this.src='/web/img/404.jpg'" alt="填坑录"/></a><div class="content"><a class="title" href="/web/post/16106.html" title="填坑录">填坑录</a><time datetime="2022-11-26T16:31:04.787Z" title="发表于 2022-11-27 00:31:04">2022-11-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/web/post/11314.html" title="uniapp开发,遇坑填坑 😘"><img data-lazy-src="/web/img/tab5.png" onerror="this.onerror=null;this.src='/web/img/404.jpg'" alt="uniapp开发,遇坑填坑 😘"/></a><div class="content"><a class="title" href="/web/post/11314.html" title="uniapp开发,遇坑填坑 😘">uniapp开发,遇坑填坑 😘</a><time datetime="2022-11-26T16:31:04.746Z" title="发表于 2022-11-27 00:31:04">2022-11-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/web/post/16107.html" title="Butterfly启动说明书"><img data-lazy-src="/web/img/tab6.png" onerror="this.onerror=null;this.src='/web/img/404.jpg'" alt="Butterfly启动说明书"/></a><div class="content"><a class="title" href="/web/post/16107.html" title="Butterfly启动说明书">Butterfly启动说明书</a><time datetime="2022-11-26T16:31:04.729Z" title="发表于 2022-11-27 00:31:04">2022-11-27</time></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('/web/img/tab2.png')"><div id="footer-wrap"><div class="copyright">&copy;2019 - 2022 By ZhuoRu</div><div class="footer_custom_text">I wish you to become your own sun, no need to rely on who's light.<p><a target="_blank" href="https://hexo.io/"><img src="https://img.shields.io/badge/Frame-Hexo-blue?style=flat&logo=hexo" title="博客框架为Hexo"></a>&nbsp;<a target="_blank" href="https://butterfly.js.org/"><img src="https://img.shields.io/badge/Theme-Butterfly-6513df?style=flat&logo=bitdefender" title="主题采用butterfly"></a>&nbsp;<a target="_blank" href="https://www.jsdelivr.com/"><img src="https://img.shields.io/badge/CDN-jsDelivr-orange?style=flat&logo=jsDelivr" title="本站使用JsDelivr为静态资源提供CDN加速"></a> &nbsp;<a target="_blank" href="https://vercel.com/ "><img src="https://img.shields.io/badge/Hosted-Vervel-brightgreen?style=flat&logo=Vercel" title="本站采用双线部署，默认线路托管于Vercel"></a>&nbsp;<a target="_blank" href="https://vercel.com/ "><img src="https://img.shields.io/badge/Hosted-Coding-0cedbe?style=flat&logo=Codio" title="本站采用双线部署，联通线路托管于Coding"></a>&nbsp;<a target="_blank" href="https://github.com/"><img src="https://img.shields.io/badge/Source-Github-d021d6?style=flat&logo=GitHub" title="本站项目由Gtihub托管"></a>&nbsp;<a target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img src="https://img.shields.io/badge/Copyright-BY--NC--SA%204.0-d42328?style=flat&logo=Claris" title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可"></a></p></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><a class="icon-V hidden" onclick="switchNightMode()" title="浅色和深色模式转换"><svg width="25" height="25" viewBox="0 0 1024 1024"><use id="modeicon" xlink:href="#icon-moon"></use></svg></a><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/web/js/utils.js"></script><script src="/web/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script src="/web/js/search/local-search.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>(()=>{
  const $countDom = document.getElementById('twikoo-count')
  const init = () => {
    twikoo.init(Object.assign({
      el: '#twikoo-wrap',
      envId: 'https://wechat-delta.vercel.app/',
      region: 'ap-guangzhou'
    }, null))
  }

  const getCount = () => {
    twikoo.getCommentsCount({
      envId: 'https://wechat-delta.vercel.app/',
      region: 'ap-guangzhou',
      urls: [window.location.pathname],
      includeReply: false
    }).then(function (res) {
      $countDom.innerText = res[0].count
    }).catch(function (err) {
      console.error(err);
    });
  }

  const loadTwikoo = (bool = false) => {
    if (typeof twikoo === 'object') {
      init()
      bool && $countDom && setTimeout(getCount,0)
    } else {
      getScript('https://cdn.jsdelivr.net/npm/twikoo/dist/twikoo.all.min.js').then(()=> {
        init()
        bool && $countDom && setTimeout(getCount,0)
      })
    }
  }

  if ('Twikoo' === 'Twikoo' || !true) {
    if (true) btf.loadComment(document.getElementById('twikoo-wrap'), loadTwikoo)
    else loadTwikoo(true)
  } else {
    window.loadOtherComment = () => {
      loadTwikoo()
    }
  }
})()</script></div><canvas id="universe"></canvas><div class="aplayer no-destroy" data-id="7592292364" data-server="netease" data-type="playlist" data-fixed="true" data-autoplay="true" data-loop="all" data-lrctype="0"> </div><script defer src="https://npm.elemecdn.com/jquery@latest/dist/jquery.min.js"></script><script defer src="./js/universe.js"></script><script defer src="./js/sun_moon.js"></script><script defer src="https://fastly.jsdelivr.net/gh/graingert/wow@1.3.0/dist/wow.min.js"></script><script defer data-pjax src="/js/wow_init.js"></script><script defer src="https://fastly.jsdelivr.net/npm/hexo-theme-volantis@latest/source/js/issues.min.js"></script><canvas class="fireworks" mobile="false"></canvas><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/fireworks.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = false;
POWERMODE.mobile = false;
document.body.addEventListener('input', POWERMODE);
</script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script><script src="https://cdn.jsdelivr.net/gh/metowolf/MetingJS@1.2/dist/Meting.min.js"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = [
  'title',
  '#config-diff',
  '#body-wrap',
  '#rightside-config-hide',
  '#rightside-config-show',
  '.js-pjax'
]

if (false) {
  pjaxSelectors.unshift('meta[property="og:image"]', 'meta[property="og:title"]', 'meta[property="og:url"]')
}

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof chatBtnFn === 'function' && chatBtnFn()
  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // Analytics
  if (false) {
    MtaH5.pgv()
  }

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()

  typeof preloader === 'object' && preloader.endLoading()
})


document.addEventListener('pjax:send', function () {
  typeof preloader === 'object' && preloader.initLoading()
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><!-- hexo injector body_end start --><script data-pjax>
  function butterfly_swiper_injector_config(){
    var parent_div_git = document.getElementById('recent-posts');
    var item_html = '<div class="recent-post-item" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;post/1026.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="/img/tab99.png" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-11-27</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;post/1026.html&quot;);" href="javascript:void(0);" alt="">Vue3学习总结</a><div class="blog-slider__text">前端内卷的开始,Vue3开发上手总结</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;post/1026.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;post/1038.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="/img/tab5.png" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-11-27</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;post/1038.html&quot;);" href="javascript:void(0);" alt="">css学习总结</a><div class="blog-slider__text">课程目标:1. 学会使用CSS选择器2. 熟记CSS样式和外观属性3. 熟练掌握CSS各种选择器4. 熟练掌握CSS各种选择器5. 熟练掌握CSS三种显示模式6. 熟练掌握CSS背景属性7. 熟练掌握CSS三大特性8. 熟练掌握CSS盒子模型9. 熟练掌握CSS浮动10.熟练掌握CSS定位11.熟练掌握CSS高级技巧强化CSS</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;post/1038.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;post/16107.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="/img/tab6.png" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-11-27</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;post/16107.html&quot;);" href="javascript:void(0);" alt="">Butterfly启动说明书</a><div class="blog-slider__text">启动说明书</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;post/16107.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;post/2020715.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="/img/tab2.png" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-11-27</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;post/2020715.html&quot;);" href="javascript:void(0);" alt="">html学习总结</a><div class="blog-slider__text">学习目标:了解常用浏览器;掌握WEB标准;理解标签语义化;掌握常用的排版标签;掌握常用的文本格式化图像链接等标签;掌握三种列表标签;掌握表格标签;掌握表格标签;掌握表单标签</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;post/2020715.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div></div>';
    console.log('已挂载butterfly_swiper')
    parent_div_git.insertAdjacentHTML("afterbegin",item_html)
    }
  var elist = 'undefined'.split(',');
  var cpage = location.pathname;
  var epage = 'all';
  var flag = 0;

  for (var i=0;i<elist.length;i++){
    if (cpage.includes(elist[i])){
      flag++;
    }
  }

  if ((epage ==='all')&&(flag == 0)){
    butterfly_swiper_injector_config();
  }
  else if (epage === cpage){
    butterfly_swiper_injector_config();
  }
  </script><script defer src="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper.min.js"></script><script defer data-pjax src="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper_init.js"></script><script async src="//at.alicdn.com/t/font_2032782_8d5kxvn09md.js"></script><!-- hexo injector body_end end --></body></html>